package com.learn.eduuserboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author m
 * @since 2022-04-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="User对象", description="用户表")
@Accessors(chain = true)
public class User implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "用户id")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户昵称")
    private String name;

    @ApiModelProperty(value = "用户头像地址")
    private String portrait;

    @ApiModelProperty(value = "注册手机")
    private String phone;

    @ApiModelProperty(value = "用户密码（可以为空，支持只用验证码注册、登录）")
    private String password;

    @ApiModelProperty(value = "加盐")
    private String salt;

    @ApiModelProperty(value = "注册ip")
    private String regIp;

    @ApiModelProperty(value = "是否有效用户")
    private Boolean accountNonExpired;

    @ApiModelProperty(value = "账号是否未过期")
    private Boolean credentialsNonExpired;

    @ApiModelProperty(value = "是否未锁定")
    private Boolean accountNonLocked;

    @ApiModelProperty(value = "用户状态：ENABLE能登录，DISABLE不能登录")
    private String status;

    @ApiModelProperty(value = "是否删除")
    @TableField("is_del")
    private Boolean del;

    @ApiModelProperty(value = "注册时间")
    private Date createTime;

    @ApiModelProperty(value = "记录更新时间")
    private Date updateTime;


}
